/**
 * 
 */
package com.zhenai.rocyuan.web.listener;

import javax.servlet.ServletContextEvent;
import javax.xml.rpc.ServiceFactory;

import org.apache.log4j.Logger;

import com.zhenai.rocyuan.util.ServletUtils;

/**
 * @author Gao Youbo
 * @since 2013-1-8
 * @Description
 * @TODO
 */
public class StandardStartupListener extends AbstractStartupListener {

    private static final Logger log = Logger.getLogger(StandardStartupListener.class);

    /*
     * (non-Javadoc)
     * 
     * @see
     * org.mspring.mlog.web.listener.AbstractStartupListener#startuped(javax
     * .servlet.ServletContextEvent)
     */
    @Override
    public void startuped(ServletContextEvent event) {    	
    	String contextPath = event.getServletContext().getContextPath();
    	if(contextPath.indexOf("springmybatis")>-1){
    		event.getServletContext().setAttribute("applicationIP", "http://127.0.0.1:8080/springmybatis");
    	}else{
    		event.getServletContext().setAttribute("applicationIP", "http://rocxue.duapp.com");
    	}
    	
        log.info("StandardStartupListener服务器启动……………….");
    }

}
